package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PubAichatLogMapper;
import com.ruoyi.system.domain.PubAichatLog;
import com.ruoyi.system.service.IPubAichatLogService;

/**
 * Ai聊天日志Service业务层处理
 * 
 * @author gongxt
 * @date 2024-09-14
 */
@Service
public class PubAichatLogServiceImpl implements IPubAichatLogService 
{
    @Autowired
    private PubAichatLogMapper pubAichatLogMapper;

    /**
     * 查询Ai聊天日志
     * 
     * @param id Ai聊天日志主键
     * @return Ai聊天日志
     */
    @Override
    public PubAichatLog selectPubAichatLogById(Long id)
    {
        return pubAichatLogMapper.selectPubAichatLogById(id);
    }

    /**
     * 查询Ai聊天日志列表
     * 
     * @param pubAichatLog Ai聊天日志
     * @return Ai聊天日志
     */
    @Override
    public List<PubAichatLog> selectPubAichatLogList(PubAichatLog pubAichatLog)
    {
        return pubAichatLogMapper.selectPubAichatLogList(pubAichatLog);
    }

    /**
     * 新增Ai聊天日志
     * 
     * @param pubAichatLog Ai聊天日志
     * @return 结果
     */
    @Override
    public int insertPubAichatLog(PubAichatLog pubAichatLog)
    {
        pubAichatLog.setCreateTime(DateUtils.getNowDate());
        return pubAichatLogMapper.insertPubAichatLog(pubAichatLog);
    }

    /**
     * 修改Ai聊天日志
     * 
     * @param pubAichatLog Ai聊天日志
     * @return 结果
     */
    @Override
    public int updatePubAichatLog(PubAichatLog pubAichatLog)
    {
        return pubAichatLogMapper.updatePubAichatLog(pubAichatLog);
    }

    /**
     * 批量删除Ai聊天日志
     * 
     * @param ids 需要删除的Ai聊天日志主键
     * @return 结果
     */
    @Override
    public int deletePubAichatLogByIds(Long[] ids)
    {
        return pubAichatLogMapper.deletePubAichatLogByIds(ids);
    }

    /**
     * 删除Ai聊天日志信息
     * 
     * @param id Ai聊天日志主键
     * @return 结果
     */
    @Override
    public int deletePubAichatLogById(Long id)
    {
        return pubAichatLogMapper.deletePubAichatLogById(id);
    }
}
